using System;
using System.Collections.Generic;
using System.Text;

namespace egypt.Logic
{
    public class News
    {
        int id;

        public int ID
        {
            get { return id; }
        }
        string title;

        public string Title
        {
            get { return title; }
            set { title = value; }
        }
        string content;

        public string Content
        {
            get { return content; }
            set { content = value; }
        }
        DateTime addtime;

        public DateTime Addtime
        {
            get { return addtime; }
        }
        int hit;

        public int Hit
        {
            get { return hit; }
        }
        int category;

        public int Category
        {
            get { return category; }
        }
        int countryID;

        public int CountryID
        {
            get { return countryID; }
            set { countryID = value; }
        }
        int fuwuID;

        public int FuwuID
        {
            get { return fuwuID; }
            set { fuwuID = value; }
        }

        public static News GetInstance(string title, string content, int category)
        {
            return GetInstance(title, content, category, 0, 0);
        }
        public static News GetInstance(string title, string content,int category,int countryID,int fuwuID)
        {
            return GetInstance(0, title, content, DateTime.Now, 0, category, countryID, fuwuID);
        }
        public static News GetInstance(int id, string title, string content)
        {
            return GetInstance(id, title, content, DateTime.Now, 0, 0);
        }
        public static News GetInstance(int id, string title, string content, DateTime addtime, int hit, int category)
        {
            return GetInstance(id, title, content, addtime, hit, category, 0, 0);
        }
        public static News GetInstance(int id,string title,string content,DateTime addtime,int hit,int category,int countryID,int fuwuID)
        {
            News n = new News();
            n.id = id;
            n.title = title;
            n.content = content;
            n.addtime = addtime;
            n.hit = hit;
            n.category = category;
            n.countryID = countryID;
            n.fuwuID = fuwuID;
            return n;
        }
    }
}
